import static org.junit.Assert.*;

import java.util.Arrays;

import org.junit.Test;


public class SortTest {
	
	private int[][] testData = new int[][]{
			{1},
			{1,2},
			{2,1},
			{1,2,3},
			{1,3,2},
			{2,1,3},
			{2,3,1},
			{3,1,2},
			{3,2,1} };
	
	@Test
	public void bubbleTest() {
		BubbleSorter bs = new BubbleSorter();
		
		for (int i = 0; i < testData.length; i++) {
			int[] temp = testData[i].clone();
			Arrays.sort(temp);
			assertArrayEquals(temp, bs.Sort(testData[i]));
		}
		
		SampleDataProvider sdp100 = new SampleDataProvider(100, 14);
		assertArrayEquals(sdp100.getSorted(), bs.Sort(sdp100.getUnsorted()));
	}

}
